<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>签到</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui-flex.css" />
    <style type="text/css">
      body {margin: 0;padding: 0;background-color: #fe427b;}
			.top img { width: 100%;height: 100%;}
			.header {display: flex;width: 100%;display: -webkit-flex;justify-content: space-between;height: 4rem;align-items: center;-webkit-justify-content: space-between;-webkit-align-items: center;padding: 0 0.5rem}
			.bk {}
      .bk img {margin-left: 0.2rem;width: 0.5rem;}
			.qd {font-size: 0.8rem;color: #ffffff;}
      .ctn { width: 56%;margin: 0 auto;position: absolute;top: 80px;left: 25%;}
      .size {text-align: center;font-size: 0.6rem;color: #fff;}
      .size span {font-size: 1.7rem;color: #fff;}
      .btn {width: 9rem;margin: 10px auto;}
			.btn img {width: 100%;}
			.arc {height: 2.5rem;line-height: 1rem;margin-top: 0.5rem;text-align: center;color: #fff;font-size: 0.6rem;}
			.contain {padding: 20px 20px;}
      .top-img {width: 10rem;margin: 0 auto;}
      .top-img img {width: 100%;}
      .tops-img {width: 10rem;margin: 20px auto;}
      .tops-img img {width: 100%;}
      .tit {display: flex;border-radius: 0.2rem;height: 3.75rem;margin-top: 1rem;background-color: #fff;padding: 0px 0.5rem;display: -webkit-flex;align-items: center;-webkit-align-items: center;justify-content: space-between;-webkit-justify-content: space-between;}
      .p1 {margin-bottom: 0;font-size: 0.8rem;color: #333333;}
      .p1 span {color: #fe427b;}
      .p1 img {width: 0.6rem;display: inline-block;}
      .p2 {font-size: 14px;margin-bottom: 0;margin-top: 0px;color: #999999;}
      .cetn {padding-left: 0.4rem;}
      .left img {margin-bottom: 0.4rem;width: 1.75rem;align-items: center;}
      .right img {margin-bottom: 0.3rem;width: 2.7rem;align-items: center}
      .box1 {display: none;position: absolute;top: 0;background-color: rgba(0, 0, 0, 0.3);width: 100%;z-index: 999;}
      .box1 img {width: 100%;}
    </style>
</head>
<body>
    <div class="box">
        <div class="top">
           <img src="../image/qd/bj2.png" alt="">
        </div>
        <div class="ctn">
          <div class="size">
            <span id="score">0</span>
            <br>
            我的积分余额
          </div>
        </div>
        <div class="contain">
          <div class="top-img">
              <img src="../image/qd/imgs.png" alt="">
          </div>
          <div class="tit">
            <div class="left">
               <img src="../image/qd/yes2.png" alt="">
            </div>
            <div class="cetn">
              <p class="p1">浏览<span id="days7_condition"></span>件商品 <span>+<span id="days7_reward"></span> <img src="../image/qd/mon.png" alt=""></span> </p>
              <p class="p2"><span id="days7_status"></span></p>
            </div>
            <div class="right">
              <img src="../image/qd/over.png"  onclick="closeWin();" tapmode>
            </div>
          </div>

          <div class="tit">
            <div class="left">
              <img src="../image/qd/yes2.png" alt="">
            </div>
            <div class="cetn">
              <p class="p1">完成<span id="days8_condition"></span>次app分享 <span>+<span id="days8_reward"></span> <img src="../image/qd/mon.png" alt=""></span> </p>
              <p class="p2"><span id="days8_status"></span></p>
            </div>
            <div class="right">
              <img src="../image/qd/over.png"  onclick="openPublic(this)" data-frame="share_friend_frm" data-title="邀请分享" tapmode>
            </div>
          </div>

          <div class="tit">
            <div class="left">
              <img src="../image/qd/yes2.png" alt="">
            </div>
            <div class="cetn">
              <p class="p1">完成<span id="days9_condition"></span>次商品分享 <span>+<span id="days9_reward"></span> <img src="../image/qd/mon.png" alt=""></span> </p>
              <p class="p2"><span id="days9_status"></span></p>
            </div>
            <div class="right">
              <img src="../image/qd/over.png"  onclick="closeWin();" tapmode>
            </div>
          </div>

          <div class="tit">
            <div class="left">
              <img src="../image/qd/yes2.png" alt="">
            </div>
            <div class="cetn">
              <p class="p1">邀请<span id="days10_condition"></span>位有效粉丝 <span>+<span id="days10_reward"></span> <img src="../image/qd/mon.png" alt=""></span> </p>
              <p class="p2"><span id="days10_status"></span></p>
            </div>
            <div class="right">
              <img src="../image/qd/over.png" onclick="openPublic(this)" data-frame="share_friend_frm" data-title="邀请分享" tapmode>
            </div>
          </div>
          <div class="tit">
            <div class="left">
              <img src="../image/qd/yes2.png" alt="">
            </div>
            <div class="cetn">
              <p class="p1">邀请好友购买会员 <span>+<span id="days11_reward"></span> <img src="../image/qd/mon.png" alt=""></span> </p>
              <p class="p2"><span id="days11_status"></span></p>
            </div>
            <div class="right">
              <img src="../image/qd/over.png"  onclick="openPublic(this)" data-frame="share_friend_frm" data-title="邀请分享" tapmode>
            </div>
          </div>


          <!-- 新手任务 -->
          <div class="tops-img">
             <img src="../image/qd/img.png" alt="">
          </div>

          <div class="tit">
            <div class="left">
              <img src="../image/qd/yes2.png" alt="">
            </div>
            <div class="cetn">
              <p class="p1">购买<span id="newuser1_condition"></span>个有效订单 <span>+<span id="newuser1_reward"></span> <img src="../image/qd/mon.png" alt=""></span> </p>
              <p class="p2"><span id="newuser1_status"></span></p>
            </div>
            <div class="right">
              <img src="../image/qd/over.png"  onclick="closeWin();" tapmode>
            </div>
          </div>
          <div class="tit">
            <div class="left">
              <img src="../image/qd/yes2.png" alt="">
            </div>
            <div class="cetn">
              <p class="p1">分享购买<span id="newuser2_condition"></span>个有效订单 <span>+<span id="newuser2_reward"></span> <img src="../image/qd/mon.png" alt=""></span> </p>
              <p class="p2"><span id="newuser2_status"></span></p>
            </div>
            <div class="right">
              <img src="../image/qd/over.png"  onclick="closeWin();" tapmode>
            </div>
          </div>
          <div class="tit">
            <div class="left">
              <img src="../image/qd/yes2.png" alt="">
            </div>
            <div class="cetn">
              <p class="p1">完成<span id="newuser3_condition"></span>次app分享 <span>+<span id="newuser3_reward"></span> <img src="../image/qd/mon.png" alt=""></span> </p>
              <p class="p2"><span id="newuser3_status"></span></p>
            </div>
            <div class="right">
              <img src="../image/qd/over.png"  onclick="openPublic(this)" data-frame="share_friend_frm" data-title="邀请分享" tapmode>
            </div>
          </div>
          <div class="tit">
            <div class="left">
              <img src="../image/qd/yes2.png" alt="">
            </div>
            <div class="cetn">
              <p class="p1">完成<span id="newuser4_condition"></span>次商品分享 <span>+<span id="newuser4_reward"></span> <img src="../image/qd/mon.png" alt=""></span> </p>
              <p class="p2"><span id="newuser4_status"></span></p>
            </div>
            <div class="right">
              <img src="../image/qd/over.png"  onclick="closeWin();" tapmode>
            </div>
          </div>
          <div class="tit">
            <div class="left">
              <img src="../image/qd/yes2.png" alt="">
            </div>
            <div class="cetn">
              <p class="p1">邀请<span id="newuser5_condition"></span>位有效粉丝 <span>+<span id="newuser5_reward"></span> <img src="../image/qd/mon.png" alt=""></span> </p>
              <p class="p2"><span id="newuser5_status"></span></p>
            </div>
            <div class="right">
              <img src="../image/qd/over.png"  onclick="openPublic(this)" data-frame="share_friend_frm" data-title="邀请分享" tapmode>
            </div>
          </div>
          <div class="tit">
            <div class="left">
              <img src="../image/qd/yes2.png" alt="">
            </div>
            <div class="cetn">
              <p class="p1">首次购买会员 <span>+<span id="newuser6_reward"></span> <img src="../image/qd/mon.png" alt=""></span> </p>
              <p class="p2"><span id="newuser6_status"></span></p>
            </div>
            <div class="right">
              <img src="../image/qd/over.png" onclick="openPublic(this)" data-frame="ccus_frm" tapmode>
            </div>
          </div>
         </div>
      </div>


</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/zepto.min.js" ></script>
<script type="text/javascript" src="../script/doT.min.js" ></script>
<script type="text/javascript" src="../script/common.js" ></script>
<script type="text/javascript">
    apiready = function () {
      api.parseTapmode();
      //下拉刷新
      _Refresh(function(){
          getData();
      });
      getData();
    }
    function getData(){
      _loading2();
      _Ajax(window.APIServer.Task,'get',{values:{}},'json',function(ret){
        _loading2_close();
          if (ret.code==1) {
            $('#score').html(ret.data.score);
            var rules = ret.data.rules;
            $.each(rules.days,function(k,v){
              $('#days'+k+'_condition').html(v.condition);
              $('#days'+k+'_reward').html(v.reward);
              $('#days'+k+'_status').html('完成 '+v.finish+'/'+v.condition);
              if (v.finish>=v.condition) {
                $('#days'+k+'_status').parent().parent().next().find('img').attr('src','../image/qd/finish.png');
              }
            });
            $.each(rules.newuser,function(k,v){
              $('#newuser'+k+'_condition').html(v.condition);
              $('#newuser'+k+'_reward').html(v.reward);
              $('#newuser'+k+'_status').html('完成 '+v.finish+'/'+v.condition);
              if (v.finish>=v.condition) {
                $('#newuser'+k+'_status').parent().parent().next().find('img').attr('src','../image/qd/finish.png');
              }
            });
          }else{
              _toast(ret.msg)
          }
      })
    }
</script>
</html>
